<%@ page language="java" pageEncoding="UTF-8"
	errorPage="../../defaultException.jsp"%>
<%@include file="../../tags.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>添加酒店基础信息</title>
<%@include file="../../head.jsp"%>
</head>
<body>
	<form id="fm" method="post" enctype="multipart/form-data">
		<table style="width: 400px">

			<tr>
				<td><label>酒店中文名:</label>
				</td>
				<td><input name="zhname"
					data-options="required:true,validType:'length[0,64]'"
					class="easyui-validatebox">
				</td>
				<td><label>酒店英文名:</label>
				</td>
				<td><input name="enname"
					data-options="required:true,validType:'length[0,64]'"
					class="easyui-validatebox">
				</td>
			</tr>
			<tr>
				<td><label>官方网址:</label>
				</td>
				<td><input name="url" class="easyui-validatebox"
					data-options="required:true,validType:'length[0,100]'">
				</td>
				<td><label>酒店地址:</label>
				</td>
				<td><input name="address" class="easyui-validatebox"
					data-options="required:true,validType:'length[0,150]'">
				</td>
			</tr>
			<tr>
				<td><label>酒店的纬度: </label></td>
				<td><input name="lat" class="easyui-validatebox"
					validType="numberbox" /></td>
				<td><label>酒店的经度: </label></td>
				<td><input name="lng" class="easyui-validatebox"
					validType="numberbox" /></td>
			</tr>
			<tr>
				<td><label>酒店电话:</label>
				</td>
				<td><input name="tel"
					data-options="required:true,validType:'length[0,32]'"
					class="easyui-validatebox">
				</td>
				<td><label>总评分:</label>
				</td>
				<td><input name="score" validType="numberbox"
					class="easyui-validatebox">
				</td>
			</tr>
			<tr>
				<td><label>房间数:</label>
				</td>
				<td><input name="houses" data-options="validType:'length[0,8]'"
					class="easyui-validatebox">
				</td>
				<td><label>最低价:</label>
				</td>
				<td><input name="price" data-options="validType:'length[0,16]'"
					class="easyui-validatebox">
				</td>
			</tr>
			<tr>
				<td><label>邮箱地址:</label>
				</td>
				<td><input name="email" data-options="validType:'email'"
					class="easyui-validatebox">
				</td>
				<td>酒店版权：</td>
				<td><input name="copyright"
					data-options="validType:'length[0,64]'" class="easyui-validatebox">
				</td>
			</tr>
			<tr>
				<td><label>版本类型：</label></td>
				<td><select name="viewStyle">
					<option value="1">完整版</option>
					<option value="2">简化版</option>
				</select></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td><label>概述摘要: </label>
				</td>
				<td colspan="3"><textarea name="summary" id="hotelSummary"
						style="width: 350px; height: 200px" class="easyui-validatebox"
						data-options="validType:'length[0,64]'" required="true"></textarea>
				</td>
			</tr>
			<tr>
				<td><label>酒店的概述: </label>
				</td>
				<td colspan="3"><textarea name="content" id="hotelDesc"
						style="width: 350px; height: 200px" class="easyui-validatebox"
						data-options="validType:'length[0,2048]'" required="true"></textarea>
				</td>
			</tr>
			<tr>
				<td><label>酒店特色:</label>
				</td>
				<td colspan="3"><textarea id="hotelSpecial" name="special"
						class="easyui-validatebox"
						data-options="validType:'length[0,512]'"
						class="easyui-validatebox" style="width: 500px; height: 80px"></textarea>
				</td>
			</tr>
			<tr>
				<td><label>酒店荣誉:</label>
				</td>
				<td colspan="3"><textarea id="hotelHonor" name="honor"
						class="easyui-validatebox"
						data-options="validType:'length[0,512]'"
						style="width: 500px; height: 80px"></textarea>
				</td>
			</tr>
			<tr>
				<td><label>地里位置:</label>
				</td>
				<td colspan="3"><textarea id="hotelLocation" name="location"
						class="easyui-validatebox"
						data-options="validType:'length[0,256]'"
						style="width: 500px; height: 80px"></textarea>
				</td>
			</tr>
			<tr>
				<td><label>酒店主图片:</label>
				</td>
				<td colspan="3"><input id="hotelImg" name="imagepart"
					type="file" class="easyui-validatebox" required="true">
				</td>

			</tr>
			<tr>
				<td><label>小图片1:</label>
				</td>
				<td colspan="3"><input name="hfile1" type="file"
					class="easyui-validatebox" required="true">
				</td>

			</tr>
			<tr>
				<td><label>小图片2:</label>
				</td>
				<td colspan="3"><input name="hfile2" type="file"
					class="easyui-validatebox" required="true">
				</td>

			</tr>
			<tr>
				<td><label>酒店logo:</label>
				</td>
				<td colspan="3"><input name="logoFile" type="file"
					class="easyui-validatebox" required="true">
				</td>

			</tr>

			<tr>
				<td><label>酒店的风格:</label>
				</td>
				<td colspan="3">
					<table>
						<c:set var="styleSize" value="${fn:length(hotelStyleList)}"></c:set>
						<c:forEach var="style" items="${hotelStyleList}"
							varStatus="status">
							<c:if test="${status.count==1||(status.count-1)%5==0}">
								<tr>
							</c:if>
							<td><input type="checkbox" name="hotelStyles"
								value="${style.styleId}" /><label>${style.styleName }</label></td>
							<c:if test="${status.count%5==0||status.count==styleSize}">
								</tr>
							</c:if>
						</c:forEach>
					</table></td>
			</tr>
			<tr>
				<td><label>酒店提供的服务:</label>
				</td>
				<td colspan="3">
					<table>
						<c:set var="size" value="${fn:length(hotelServiceList)}"></c:set>
						<c:forEach var="result" items="${hotelServiceList}"
							varStatus="status">
							<c:if test="${status.count==1||(status.count-1)%5==0}">
								<tr>
							</c:if>
							<td><input type="checkbox" name="hotelServices"
								value="${result.serviceCategoryId}" /> <img
								src="${image_domain}${result.serviceCategoryOssIcon}"
								alt="${result.serviceCategoryTip}" /></td>
							<c:if test="${status.count%5==0||status.count==size}">
								</tr>
							</c:if>
						</c:forEach>
					</table>
				</td>
			</tr>
		</table>


	</form>
	<script type="text/javascript">
		//初始化酒店风格列表
		//$('#styleId').combobox({  
		// url:'${cpath }/admin//hotel/hotelAction.do?action=listHotelTag',  
		// valueField:'styleId',  
		// textField:'styleName',
		// editable : false
		//}); 

		$('#hotelDesc').ceditor();
		$('#hotelSpecial').ceditor();
		$('#hotelHonor').ceditor();
		$('#hotelLocation').ceditor();
		$('#hotelSummary').ceditor();
	</script>
	<style type="text/css">
#fm {
	margin: 0;
	padding: 20px 20px;
}

.ftitle {
	font-size: 14px;
	font-weight: bold;
	padding: 5px 0;
	margin-bottom: 10px;
	border-bottom: 1px solid #ccc;
}

.fitem {
	margin-bottom: 5px;
}

.fitem label {
	display: inline-block;
	width: 90px;
}

td {
	white-space: nowrap;
}
</style>
</body>
</html>